// (全站TDK规范化)[https://c.csdn.net/pages/viewpage.action?pageId=151424696]
import type { RouterConfig } from '@nuxt/schema'
import type { RouteRecordBase } from './type.d'

export default {
  // https://router.vuejs.org/zh/introduction.html
  routes: (_routes): RouteRecordBase[] => [
    {
      redirect: 'news',
      path: '/',
      component: async () =>
        await import('~/pages/News/index.vue').then(r => r.default || r),
      meta: {
        'title': '前沿资讯 - 汇聚开源资讯,开源项目动态 - GitCode资讯中心',
        'reportTitle': '前沿资讯',
        'description':
          'GitCode前沿资讯是GitCode面向开发者的资讯中心,汇聚开源行业动态、开源项目资讯、活动通知等。',
        'keywords': '前沿资讯,开源资讯,开源项目动态',
        'og:image': `https://cdn-static.gitcode.com/static/images/logo-favicon.png`,
        'og:width': 48,
        'og:height': 48
      },
    },
    {
      name: 'news',
      path: '/news',
      component: async () =>
        await import('~/pages/News/index.vue').then(r => r.default || r),
      meta: {
        'title': '前沿资讯 - 汇聚开源资讯,开源项目动态 - GitCode资讯中心',
        'reportTitle': '前沿资讯',
        'description':
          'GitCode前沿资讯是GitCode面向开发者的资讯中心,汇聚开源行业动态、开源项目资讯、活动通知等。',
        'keywords': '前沿资讯,开源资讯,开源项目动态',
        'og:image': `https://cdn-static.gitcode.com/static/images/logo-favicon.png`,
        'og:width': 48,
        'og:height': 48,
        'pType':'news'
      },
    },
    {
      name: 'activity',
      path: '/activity',
      component: async () =>
        await import('~/pages/Activity/index.vue').then(r => r.default || r),
      meta: {
        'title': '开源项目活动 - 开源活动中心 - GitCode资讯中心',
        'reportTitle': '精彩活动',
        'description':
          '开源项目活动频道是GitCode推出的开源活动专栏,旨在推广最新开源项目活动动态,活动内容等,帮助广大对开源项目感兴趣的开发者了解并参与到活动中',
        'keywords': '开源项目活动,精彩活动',
        'og:image': `https://cdn-static.gitcode.com/static/images/logo-favicon.png`,
        'og:width': 48,
        'og:height': 48,
        'pType':'activity'
      },
    }, {
      name: 'search',
      path: '/search',
      component: async () =>
        await import('~/pages/Search/index.vue').then(r => r.default || r),
      meta: {
        'title': 'news - 搜索 - GitCode',
        'reportTitle': '搜索页',
        'og:image': `https://cdn-static.gitcode.com/static/images/logo-favicon.png`,
        'og:width': 48,
        'og:height': 48,
      },
    },
    {
      name: 'news-detail',
      path: '/news/:id([a-zA-Z0-9]{32})',
      component: async () =>
        await import('~/pages/NewsDetail/index.vue').then(r => r.default || r),
      meta: {
        'title': '资讯详情 - GitCode',
        'reportTitle': '资讯详情页',
        'description':
          'GitCode是面向全球开发者的开源社区,包括原创博客,开源代码托管,代码协作,项目管理等。与开发者社区互动,提升您的研发效率和质量。',
        'keywords': '开源社区,开源代码,GitCode',
        'og:image': `https://cdn-static.gitcode.com/static/images/logo-favicon.png`,
        'og:width': 48,
        'og:height': 48,
        'pType':'news'
      },
    },
    {
      name: 'activity-detail',
      path: '/activity/:id([a-zA-Z0-9]{32})',
      component: async () =>
        await import('~/pages/Activity/detail/index.vue').then(r => r.default || r),
      meta: {
        'title': '活动详情 - GitCode',
        'reportTitle': '活动详情页',
        'description':
          'GitCode是面向全球开发者的开源社区,包括原创博客,开源代码托管,代码协作,项目管理等。与开发者社区互动,提升您的研发效率和质量。',
        'keywords': '开源社区,开源代码,GitCode',
        'og:image': `https://cdn-static.gitcode.com/static/images/logo-favicon.png`,
        'og:width': 48,
        'og:height': 48,
        'pType':'activity'
      },
    },
    {
      name: '404',
      path: '/404',
      component: async () =>
        await import('~/pages/404/index.vue').then(r => r.default || r),
      meta: {
        'title': '404 - GitCode',
        'reportTitle': '404页面',
        'description':
          'GitCode是面向全球开发者的开源社区,包括原创博客,开源代码托管,代码协作,项目管理等。与开发者社区互动,提升您的研发效率和质量。',
        'keywords': '开源社区,开源代码,GitCode',
        'og:image': `https://cdn-static.gitcode.com/static/images/logo-favicon.png`,
        'og:width': 48,
        'og:height': 48
      },
    },
  ]

} as RouterConfig